MainForm Wired On BlackJack wwwwwww wwwwwwwp Form1* ! HelpLabel FPlease use the Game --> Connect menu option to start a Blackjack game. OnLineTimer DealerPictureBox CheatButton Cheat HitButton PlayHandButton Play Hand YesButton StandButton Stand PictureBox BetBox Text1 DoubleDownButton Dbl Down NoButton BetScrollBar SplitButton Split OkButton CoinsPicture1 CoinsPicture3 CoinsPicture2 CoinsPicture4 CoinsPicture5 InterruptTimer DecisionTimer ScrollBar GameMenu &Game ConnectOption &Connect... DisconnectOption &Disconnect separtor AboutOption &About... QuitOption E&xit OptionsOption &Options DeckOption2 &Deck... separator AlwaysPlayOption &Always Play NeverPlayOption &Never Play ManualPlayOption &Manual Play separator3 SoundOption &Sound Form_Click) @ Form_Load OpenFile FileName Result FileDataJ OFSTRUCT Form13 FileHandle FileRead# InputBuffer: DosWaitNmPipe FileClose Get_Serverg ErrorMessageK Display_Errora FileMenuOption_Click Index HScroll1_Change Picture1_Click ExitMenuOption_Click Response Form_GotFocus ConnectOption_Click PipeHandle8 OpenPipeP pcktE PACKET PACKET3u Action ACTN_START$ Write_Packetw Process_MessagesM Open_Pipe Servers server_info_1^ Server sv1_name! ServerNameM PipeNameg TempString ConnectButton_Click QuitButton_Click Close_Pipe ConnectButton Enabled FALSE8 DrawButton TRUEb StayButton SplitButton: SecurityButton SecurityButton_Click InsuranceButton0 StayButton_Click HitButton StandButton DoubleDownButtonR SurrenderButton PlayHandButton/ PlayHandButton_ClickD ACTN_PLAYHAND HitButton_Click ACTN_ ACTN_DRAWu StandButton_Click ACTN_STAY SplitButton_Click> ACTN_SPLIT InsuranceButton_Click ACTN_SECURITYm DisconnectButton# DoubleDownButton_Click ACTN_DOUBLEw SurrenderButton_Click ACTN_SURRENDER pckt2 PlayHandButton_DragDrop? Source DisconnectButton_Click ACTN_LOGOFF repeat ProcessMessages InterruptTimerc InterruptTimer_Timer DosMakeMailslot( pszName cbMessageSize cbMailslotSize phMailslot` DosPeekMailslot hMailslot pbBufferB pcbReturned pcbNextSize pusNextPriorityu DosDeleteMailslot- DosReadMailslot cTimeout MailSlotHandle Get_Server_And_Name PlayerName GetName PlayerNameBox GetBetO HelpLabel Caption ACTN_CONNECT ACTN_PLAY_HAND Clear_Player_Data Close_Connection{ InsuranceTimer_Timer) InsuranceTimer InsuranceForm} cdtInitm uReturn0 Draw_Player DosPeekNmPipeC Handle Buffer BufLen bRead bAvailm Status MainForm0 PictureBoxI ScaleMode] HelpLabel_Clickt @ ScrollBar_Change DisconnectOption_Click GameMenu_Click QuitOption_Click ConnectOption DisconnectOption PictureBox_Click( separator_Click DealerPictureBox_Click- Form_UnloadJ Cancelb DealerPictureBoxT NetWkstaGetInfo wksta_info_10 ErrorBytes wki10_username4 UNLEN Wksta_Info LMNetWkstaGetInfo_L10 VB_WkstaInfo5 ScrollBar Valuex Sorry scroll implementedf feature5 ScaleLeft Redraw_All_Players AboutOption_ClickW AboutFormp CurrentPlayerIndex QueryInsureForm DecisionTimer_Timer ACTN_NO_RESPONSE DecisionTimerR Clear_Data_Table OnLineTimer_Timer ACTN_READYC OnLineTimer OnLine Please Connect connection dealer DeckOption_Click ChooseDeckForm DeckId PlayerArray XOffset. BoxWidth Color Form_Paint ScaleWidth ScaleHeight Form_Resize Visible CashOnHandU PreviousTextc PreviousString CheatButton_Click ACTN_CHEATr CheatButton{ PACKETpcktZ DecidingPlayerIndex MaintainBalance Draw_HighLight_Bar DeckOption2_Clicke AlwaysPlayOption_Click AlwaysPlayOptiond Checked WindowStateU PictureBox_DblClickC DefaultBet PictureBox_MouseDown Button Shiftz WhichClick NeverPlayOption ManualPlayOption ManualPlayOption_Click NeverPlayOption_Click, DecisionTimerPurposeS DO_NOTHING' DO_DEFAULT_ACTION DO_PLAY_HANDA NO_PLAYER PictureBox_Paint Request_New_Hand SentPlayHand Process_Play_Hand PLAYER_REGION_WIDTH GamePhase PHASE_WANT_TO_PLAY7 NoButton_Click| YesButton_Click PlayHandForm NoButton: YesButton OKButton_Click! IntValue1 ACTN_BET BetBox OkButton BetScrollBard PHASE_GET_BETw PHASE_QUERY_BET switch Default BetScrollBar_Change: BetBox_Change BetAmount BetBox_KeyPressC KeyAscii CommentLabel BetFlag PHASE_QUERY_SECURITY SecurityM BaseString PASSTHRU NOPASSTHRU Handle_Disconnect LostForm OkButton_KeyPress PHASE_QUERY_BET_ONE PlaySound PHASE_QUERY_BET_TWO SoundOption_Click SoundOption# Interval RANDOM_SOUND PictureBox_GotFocus PictureBox_DragOver State CoinsPicture4_Click^ tracks the type of click on the pictureboxx ConnectOption_Click Connect to a server's dealer service. This pipe name to connect with is "dealer35" Select the Blackjack server you wish to use. If the user did not choose a server then return ZYXABC Please use the Game --> Connect menu option to start a Blackjack game. \pipe\dealer35 Get the player's namea Please enter your name." Open pipe check if pipe opened successfully Could not open connection" Error Window Please use the Game --> Connect menu option to start a Blackjack game. send ACTN_START This sets up packet reading at a specified interval. You are viewing a hand in play." PlayHandButton_Click HitButton_Click You have chosen to HIT StandButton_Click You have chosen to STAND SplitButton_Click You have chosen to SPLIT." DoubleDownButton_Click You have chosen to DOUBLE DOWN InterruptTimer_Timer This timer checks the pipe for messages from the dealer. It is not possible to check for message constantly because that approach would keep the CPU busy with checking the network and no time to react to the user interface, effectively "crashing" the system for the user. Form_Load No Name" ScrollBar_Change DisconnectOption_Click QuitOption_Click Form_Unload AboutOption_Click DecisionTimer_Timer The decision timer gives the player a limited amount of time to decide on his/her next move. If no move is decided the default action will be taken. This default actionn depends upon the current phase of the game. For example, if a hand is in playy the default action is to STAND. If a bet is being made the default action is too assume the amount of the bet is the amount currently in the BetBox text box. bet"$ Form_Paint CheatButton_Click If the user clicks on the Cheat button (which appears randomly) then punish him. Too bad. Half of your cash has been confiscated, but maybe cheating next time will work. OnLineTimer_Timer The dealer cycles through all currently connected players continuously to see if anyone has made any requests. When the dealer advances to the next player on its list it will send that player a MSG_ON_LINE. This indicates that the dealer is listening to that player. That player provides the user a small amount of time (determined by OnLineTimer) to make any actions, if the user makes an action then the dealer is notified of that, if not the timer goes off and the dealerr is notified that this player has nothing to say at the moment so go ahead andd check other players. If the player makes an action while he is not "online"" then that action is buffered. By having a small enough timeslice thiss round-robin technique reacts quick enough for this game. On Line request returned with no action.u DeckOption2_Click AlwaysPlayOption_Click When the player chooses to be in AlwaysPlay mode the software will automaticallyy request a new hand from the dealer whenever the current hand is done. If there is no hand currently in play then request a new hand right away.a PictureBox_DblClick double clicking on the picture box indicates "hit me"m PictureBox_MouseDown ManualPlayOption_Click Manual Play mode let's the user choose when and if they want to start a new hand.e The hand is over. Click on Play Hand to start a new hand." NeverPlayOption_Click Never play mode informs the dealer that this player never wishes to join in a hand.. Therefore the player will always remain in view mode.e The hand is over." PictureBox_Paint NoButton_Click Depending upon the phase of the game the No button is handled differently. If the phase is PHASE_WANT_TO_PLAY then clicking on the no button indicatess that the player does not wish to join in the current hand. If the phase is PHASE_QUERY_SECURITY then clicking on the no button indicatess that the player does not want any insurance for the current hand.o The ACTN_READY here indicates that this player does not want to play. A new hand is about to begin." Please wait while other players decide on insurance. YesButton_Click Please wait while other players decide on insurance. OKButton_Click This button is used when a bet is to be obtained. Please wait while other players make their bets. BetScrollBar_Change Moving the scrollbar changes the amount of the bet and adds humorous comment.d Enter your bet." Hey, no pain, no gain. Hey, we have a high roller here. Here goes lunch for next week. Keep it up." Bet more. Bet more." Even more than that. What's another 100?" Just do it." You did it." Can't you stop doing it? Oooh. We got a live one. BetBox_Change Make sure that the amount entered in the BetBox is within the CashOnHand for thee current player. Also update the scroll bar to reflect the number just entered.h BetBox_KeyPress OkButton_KeyPress SoundOption_Click